<template>
    <input-table style="width:100%"
                 :readOnly="$props.readOnly"
                 v-model="table" @add="v=>{}">

        <template #head > <div  v-if="title" class="title">
            {{title}}
        </div>
        </template>
        <el-table-column align="center" label="gitData">
            <template v-slot="scope">
                <el-input v-model="scope.row.gitData"></el-input>
            </template>
        </el-table-column>
        <el-table-column align="center" label="buildInfo">
            <template v-slot="scope">
                <el-input v-model="scope.row.buildInfo"></el-input>
            </template>
        </el-table-column>
    </input-table>

</template>

<script setup>
/**
 * Created by CodeGenerator at 2024-01-23 12:39:18
 */



defineOptions({
    name: "ref-table-deploy-item",
    inheritAttrs: true,
});

//定义 vue2的this,当前组件
const $self = getCurrentInstance();

//定义 $attrs
const $attrs = useAttrs();



//定义data
const $data = reactive( {
    JenkinsLanguageEnum: jv.enum.JenkinsLanguageEnum.getData(),
    SystemEnvEnum: jv.enum.SystemEnvEnum.getData(),
    MicroServiceDeployEnvEnum: jv.enum.MicroServiceDeployEnvEnum.getData(),
});


const $props = defineProps({
    title : { type: String },
    readOnly : { type: Boolean }
});


const $model = defineModel({ type: Array });



const list = ref();

//定义事件
const $emit = defineEmits(["update:modelValue","loaded"]);

const table = $computed({ get() {
        return $model;
    },set(v){
        var v = Object.assign([], v);
        $emit("update:modelValue", v);
    } });

const procData = function(res, op) {
    let json = res.data.data;
    json.forEach(it => {
//如果是组合实体，设置 it.id=...
    });
};





</script>

<style scoped lang="scss">
.title{
    margin-top:10px;
    &:after{
        content: "：";
        display: inline-block;
    }
}
</style>